<?php

 // Debug mode 
//define('DEBUG',true); 
ini_set('display_errors', 1);
//ini_set('log_errors', 1);
//ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
//error_reporting(E_ALL);

define ('DIRSEP', '/');

$domain = $_SERVER['SERVER_NAME'];
if ($domain=='localhost'){
    define ('LOCAL_DEV',1);  
}else{
    define ('LOCAL_DEV',0);      
}
define( 'ABSPATH', dirname(dirname(__FILE__)) . '/edf_demo/' );    
define( 'APPURIPATH', 'http://'.$_SERVER['SERVER_NAME'] . '/edf_demo/' );    

define('ASSET_MANAGER_CURL_TIMEOUT',10000);  
define( "_CUR_OS", substr( php_uname(), 0, 7 ) == "Windows" ? "Win" : "_Nix" );

define('APP_URL',"http://adestore.co.uk/edf_demo/");
//define('APP_URL',"http://www.tipsservice.co.uk/facebook_apps/edf_demo/");

define('APP_FB_URL',"http://apps.facebook.com/wella_edf_demo/");
define('APP_NAME',"wella_edf_demo");

define("EDF_FILE_UPLOAD_DIR",ABSPATH.'images/reports/');   
//define("EDF_THUMBNAILS_FOLDER", EDF_FILE_UPLOAD_DIR. 'thumbnails/');   
define("EDF_THUMBNAILS_FOLDER", APPURIPATH. 'images/reports/');   
define("EDF_THUMBNAILS_LARGE_FOLDER", EDF_FILE_UPLOAD_DIR. 'large_thumbnails/');   
define("EDF_INC_DIR",ABSPATH.'inc/');     
define("EDF_TRUNCATE_LENGTH", 30);

define("EDF_FB_DEFAULT_IMAGE", "images/q_silhouette.gif");
define("EDF_THUMBNAIL_WIDTH", 130);
define("EDF_THUMBNAIL_HEIGHT", 113);

define("EDF_THUMBNAIL_LARGE_WIDTH", 235);
define("EDF_THUMBNAIL_LARGE_HEIGHT", 203);
define("ITEMS_PER_PAGE", 8);
define("COMMENT_ITEMS_PER_PAGE", 5);
define("ITEMS_PER_ROW", 4);
define("ERROR_WRONG_ID_NO_DATA;", 'Error: Wrong id supplied, no data retrieved from Database');

define('APP_INVITE_HREF', APP_FB_URL."invite.php"); // Rename this as needed ',"wella_edf_demo/");

if (!LOCAL_DEV){
    
define('DB_HOST',"mysqldb2.ehost-services.com:3306"); // where the MySQL database resides
define('DB_USER',"madeb_edfdemo"); //  who we connect to MySQL as      
define('DB_PASSWD',"bmfg77"); // the database password   
define('DB_DATABASE',"madebisi_edf"); // the name of the MySQL database to use

}else{

define('DB_HOST',"localhost"); // where the MySQL database resides
define('DB_USER',"root"); //  who we connect to MySQL as      
define('DB_PASSWD',""); // the database password   
define('DB_DATABASE',"edfdemo"); // the name of the MySQL database to use


}

define('MAX_IDLE_TIME_MINUTES',30); // interger: number of minutes before system session ends..auto logout
  
// Get these from http://developers.facebook.com
$fb_api_key = '6a9b77e864d2508b0819d926f7f91759';
$fb_api_secret  = '59d1580f46ecd092196e21ca058454cf';
$xd_receiver_file =  'xd_receiver.htm'    ;
$fb_user_details = array();
/* While you're there, you'll also want to set up your callback url to the url
 * of the directory that contains Footprints' index.php, and you can set the
 * framed page URL to whatever you want.  You should also swap the references
 * in the code from http://apps.facebook.com/footprints/ to your framed page URL. */

// The IP address of your database
//$db_ip = '10.0.0.0';           
//$db_ip = 'mysqldb2.ehost-services.com:3306';           
$db_ip = DB_HOST;           

//$db_user = 'root';
$db_user = DB_USER;
//$db_pass = 'YOUR_DB_PASSWORD';
$db_pass = DB_PASSWD;

// the name of the database that you create for footprints.
$db_name = DB_DATABASE;

function getDBConn(){
$dbh = mysql_connect (DB_HOST, DB_USER, DB_PASSWD) or die ('I cannot connect to the database because:1 ' . mysql_error());
mysql_select_db (DB_DATABASE);
    
}
$loginErrorMessage =  "Wrong Username or Password"; 


?>
